import type { ProfileDetail, updateProfileType } from "@/types/member";
import { http } from "@/untils/request";

/**
 * 获取个人信息
 * @returns 
 */
export const getProfileDetailAPI = () => {
    return http<ProfileDetail>({
        url: '/member/profile',
        method: 'GET'
    })
}

/**
 * 修改个人信息
 * @param data 
 * @returns 
 */
export const updateProfileAPI = (data: updateProfileType) => {
    return http<ProfileDetail>({
        url: '/member/profile',
        method: 'PUT',
        data
    })
}
